package DataGo;

import java.time.LocalDateTime;

public class Date07 {
    public static void main(String[] args) {
        //获取时，分，秒，年，月，日
        LocalDateTime localDateTime = LocalDateTime.of(2222, 12, 22, 13, 44, 5);
        System.out.println(localDateTime);
        int year = localDateTime.getYear();
        int minute = localDateTime.getMinute();
        int hour = localDateTime.getHour();
        int mouth = localDateTime.getMonthValue();
        int ss = localDateTime.getSecond();
        int day = localDateTime.getDayOfMonth();
        System.out.println(year);
        System.out.println(mouth);
        System.out.println(day);
        System.out.println(hour);
        System.out.println(minute);
        System.out.println(ss);
    }
}
